/**
 * @file 项目入口文件
 *
 * @author liubin29(liubin29@baidu.com)
 * 2016年9月8日
 */
import 'babel-polyfill';
import Vue from 'vue';
import VueRouter from 'vue-router';
import App from './App.vue';
import Vuex from 'vuex';
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-default/index.css';
import $ from 'jquery';
import Hub from 'common/plugin/hub';
import Axios from 'common/plugin/axios';
import store from './vuex/store';

import index from './main/index.vue';
import home from './main/column/home.vue';
import topColumn from './main/column/top-column.vue';

window.$ = window.jQuery = $;
window.Vue = Vue;
Vue.use(VueRouter);
Vue.use(ElementUI);
Vue.use(Vuex);
Vue.use(Hub);
Vue.use(Axios);

Vue.config.devtools = true;


const routes = [{
    path: '/',
    component: index,
    children: [{
        path: '',
        component: home
    }, {
        path: 'home',
        component: home
    }, {
        path: 'top-column',
        component: topColumn
    }]
}];

const router = new VueRouter({
    transitionOnLoad: false,
    routes
});

new Vue({
    router,
    render: h => h(App),
    store
}).$mount('#app');
